package amani.wechat.platform.controller;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import amani.wechat.platform.services.IBookService;
import amani.wechat.platform.services.ICommonService;
import amani.wechat.platform.services.model.CompanyInfoEx;
import amani.wechat.platform.webserviceClient.Companyinfo;

@Controller
@RequestMapping("/Book")
public class BookController {
	@Resource(name="BookService")
	IBookService bookService;

	/**   
	 * 根据经纬度获获取附近门面信息
	 * @param longx 精度
	 * @param lat 纬度
	 * @return
	 */
	@RequestMapping("/Getnearbystore")
	@ResponseBody 
	public  List<CompanyInfoEx>  getnearbystore(double  longx,double  lat ){
		 List<CompanyInfoEx> companyList= bookService.getnearbystore(longx, lat); 
		return companyList; 
	}

 /**
  * 根据经纬度获获取附近门的员工信息
  * @param companyid 公司Id
  * @param factProject 项目类型
  * @param longx 经度
  * @param lat 纬度
  * @return
  */
	@RequestMapping("/GetEmpInofsOfNearbystore")
	@ResponseBody 
	public  List<CompanyInfoEx>  getEmpInofsOfNearbystore(String companyid,String factProject ,double  longx,double  lat ){
		 List<CompanyInfoEx> companyList= bookService.getnearbystore(longx, lat); 
		 
		return companyList; 
	} 
	
}
